Readme for Cook, Blas, Carroll, and Sinha "Two Wrongs" 10/5/2016

Simulations: 

Set working directory and ensure the following .R scripts are in that file location: 
- MC_Experiments_Results.R 
- Experiment1.R 
- Experiment2.R 
- misclass_ph1.R 
- misclass_a1_a2.R 
- probit.lf.R


to reproduce Tables 1 & 2
load McSpatial version 1.1.1
run MC_Experiments_Results.R 

Note(s): 

1) This sources Experiment1.R and Experiment2.R (where the experimental conditions are defined) 
2) McSpatial version 1.1.1 is loaded in Experiment1.R and Experiment2.R (version is required for the Hausman, et al. estimator) 
3) Experiment1.R and Experiment2.R sources the user-written functions for our estimators:  misclass_ph1.R, misclass_a1_a2.R, probit.lf.R.  

to reproduce Figure 1
load mvtnorm version 1.0-2  
load ggplot2 version 1.0.1
load McSpatial version 1.1.1
run Figure1_correlated_misclass.R 




Illustration: 

Set working directory and ensure the following .R scripts & .csv files are in that file location: 
- TwoWrongs_illustration_10_5_2016.R 
- state_panel.R 
- misclass_ph1_kpred.R 
- misclass_a1_a2.R 
- misclass_a1xz_a2xz.R
- SCAD.csv 
- Africa.AP.AF.Reports.2012.2013.tab
- predictors.tab 


to reproduce Table 3 & 4
load sp version 1.0-17
load maptools version 0.8-39
load dplyr version 0.2
load countrycode version 0.18
load cshapes version 0.4-2
load zoo version 1.7-12
load pracma version 1.8.3
load geosphere version 1.3-13
load matrixStats version 0.14.0
load dummies version 1.5.6 
load doBy version 4.5-13
load data.table version 1.9.4
load lubridate version 1.3.3
load devtools version 1.7.0
load McSpatial version 1.1.1
run TwoWrongs_illustration.R 

